import { createApp } from 'vue'
import App from './App.vue'
import router from '@/router' // 引入路由
import store from '@/store' // 引入store
import '@/assets/index' // 初始化`css`样式
import 'virtual:svg-icons-register' // 导入注册 svg 脚本

// 引入插件
import ElementIcons from '@/plugins/ElmentIcons'
import LocalIcons from '@/plugins/LocalIcons'
import BaseUi from '@/plugins/BaseUi'
import tools from '@/plugins/tools'

const app = createApp(App)
// 注册并使用 路由 / store / 插件
app.use(router).use(store).use(ElementIcons).use(LocalIcons).use(BaseUi).use(tools)
// 路由器完成初始化导航 再挂载根组件实例 - https://router.vuejs.org/zh/api/#isready
router.isReady().then(() => {
  app.mount('#app')
})
